/**
 * Created by chengke on 2018/2/28.
 */

let Sequelize = require('sequelize');

let sequelize = require('./db.js').webAccount;

module.exports = sequelize.define('adgroup', {
    id: {
        comment: '主键',
        primaryKey: true,
        type: Sequelize.INTEGER
    },
    adgroupId: {
        type: Sequelize.STRING,
        field: 'adgroup_id'
    },
    campaignId: {
        type: Sequelize.STRING,
        field: 'campaign_id'
    },
    adgroupName: {
        type: Sequelize.STRING,
        field: 'adgroup_name'
    },
    maxPrice: {
        type: Sequelize.STRING,
        field: 'max_price'
    },
    negativeWords: {
        type: Sequelize.STRING,
        field: 'negative_words'
    },
    exactNegativeWords: {
        type: Sequelize.STRING,
        field: 'exact_negative_words'
    },
    pause: {
        type: Sequelize.STRING,
        field: 'pause'
    },
    status: {
        type: Sequelize.STRING,
        field: 'status'
    },
    priceRatio: {
        type: Sequelize.STRING,
        field: 'price_ratio'
    },
    pcPriceRatio: {
        type: Sequelize.STRING,
        field: 'pc_price_ratio'
    },
    accuPricePactor: {
        type: Sequelize.STRING,
        field: 'accu_price_pactor'
    },
    wordPricePactor: {
        type: Sequelize.STRING,
        field: 'word_price_pactor'
    },
    widePricePactor: {
        type: Sequelize.STRING,
        field: 'wide_price_pactor'
    },
    matchPriceStatus: {
        type: Sequelize.STRING,
        field: 'match_price_status'
    }
}, {
    underscored: true,
    freezeTableName: true
});
